package com.gdcnano.nanoamp.media.sound.playlist
{
	import mx.collections.ArrayCollection;
	
    
    /**
     * Playlist Interface
     * @author gareevm
     *
     */
    public interface IPlaylist
    {

		/**
         * Adds track to collection
         * @param track track to add to playlist collection
         *
         */
        function addTrack(track:ITrack):void;
        
        /**
         * Returns current track object
         * @return current track
         *
         */
        function get currentTrack():ITrack;
		
		/**
		 * Sets current track 
		 * @param track
		 * 
		 */
		function set currentTrack(track:ITrack):void;
		
		/**
		 * Clears currentTrack value 
		 * 
		 */		
		function clearCurrentTrack():void;
		
		/**
		 * Current track index number 
		 * @return 
		 * 
		 */		
		function get currentTrackIndex():int;
        
		/**
		 * Switch to next track 
		 * 
		 */        
        function nextTrack():void;
		
       
		/**
		 * Switch to previous track 
		 * 
		 */
        function previousTrack():void;
		
        /**
         * Returns random track from playlist collection
         * @return random track
         *
         */
        function getRandomTrack():ITrack;
        
        
        /**
         * Returns name of the playlist if available
         * @return playlist name
         *
         */
        function get playlistName():String;
        
        /**
         * Removes track from playlist collection
         * @param track to remove from playlist collection
         *
         */
        function removeTrack(track:ITrack):void;
		
		/**
		 * Clears playlsit 
		 * 
		 */
		function clear():void;
        
        /**
         * Get read access to the playlist collection 
         * @return playlist collection
         * 
         */
        function get tracklist():ArrayCollection;
		
		function get canPlayNextTrack():Boolean;
		
		function get canPlayPreviousTrack():Boolean;
		
		function setPlaylistData(data:Object):Boolean;
    }
}